/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.business.dao.bond;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.commons.domain.bond.CereShopBondRecharge;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CereShopBondRechargeDAO extends BaseMapper<CereShopBondRecharge> {

    List<CereShopBondRecharge> getRechargeList(@Param("shopId") Long shopId);

    CereShopBondRecharge selectByRechargeNo(@Param("rechargeNo") String rechargeNo);

    /**
     * 更新充值状态
     * @param rechargeNo 充值单号
     * @param paymentStatus 支付状态
     * @param thirdPartyOrderNo 第三方订单号
     * @param payTime 支付时间
     * @return 影响行数
     */
    int updatePayState(@Param("rechargeNo") String rechargeNo,
                            @Param("paymentStatus") Integer paymentStatus,
                            @Param("thirdPartyOrderNo") String thirdPartyOrderNo,
                            @Param("payTime") LocalDateTime payTime);

}